package bean;

import java.text.SimpleDateFormat;

public class Advertisement {

	int itemId = 0;
	String itemName = null;
	String itemDescription = null;
	float itemPrice = 0;
	int itemQuantity = 0;
	String sellerInfo = null;
	int userId = 0;
	
	public Advertisement() {
		
	}
	
	public void setItemId(int itemId) {
		this.itemId = itemId;
	}
	
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	
	public void setItemDescription(String itemDescription) {
		this.itemDescription = itemDescription;
	}
	
	public void setItemPrice(float itemPrice) {
		this.itemPrice = itemPrice;
	}
	
	public void setItemQuantity(int itemQuantity) {
		this.itemQuantity = itemQuantity;
	}
	
	public void setSellerInfo(String sellerInfo) {
		this.sellerInfo = sellerInfo;
	}
	
	
	
	public void setUserId(int userId) {
		this.userId = userId;
	}
	
	public int getItemId() {
		return this.itemId;
	}
	
	public String getItemName() {
		return this.itemName;
	}
	
	public String getItemDescription() {
		return this.itemDescription;
	}
	
	public float getItemPrice() {
		return this.itemPrice;
	}
	
	public int getItemQuantity() {
		return this.itemQuantity;
	}
	
	public String getSellerInfo() {
		return this.sellerInfo;
	}
	
	public int getUserId() {
		return this.userId;
	}
	
	public String toString() {
		
		String result = new String();
		
			
		result = itemId+":#" + itemName+":#" + itemDescription+":#" + itemPrice+":#" + itemQuantity
		+":#" + sellerInfo +":#" + userId;
		return result;
		
		
	}
	
	public static String convertArrayToString(Advertisement[] aAD) {
		
		String result = null;
		
		
		for(int i=0;i<aAD.length;i++) {
			if(i==0) {
				result = aAD[i].toString();
			}
			else {
				result += "[]" + aAD[i].toString();
			}
		}
	
}
